#!/bin/sh

# NDK 目录
export ANDROID_NDK=/mnt/nas/work/make/ffmpeg/android/ffmpeg/android-ndk-r21e
# 编译工具
export TOOLCHAIN_PREFIX=$ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64
export PREBUIL=$ANDROID_NDK_HOME/toolchains/arm-linux-androideabi-4.9/prebuillinux-x86_64
export SYSTEMROOT=$ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64/sysroot
# 添加编译工具目录
export PATH=$TOOLCHAIN_PREFIX/bin:$PREBUIL/bin:$PATH
OUTPUT_PATH=/mnt/nas/work/webdav/lib/arm64-v8a/opensslLib
cd /mnt/nas/work/webdav/openssl-1.1.1l
./Configure android-arm64 --prefix=$OUTPUT_PATH \
--with-zlib-include=$SYSTEMROOT/usr/include \
--with-zlib-lib=$SYSTEMROOT/usr/lib zlib no-asm no-shared no-unit-test
make clean
make -j4
make install

